package anko

import android.app.Activity
import android.os.Bundle
import android.widget.*
import android.view.*
import org.jetbrains.anko.*

import com.kotlin.app.R

/**
 * Generate with Plugin
 * @plugin Kotlin Anko Converter For Xml
 * @version 1.3.4
 */
class TitleBarCommonActivity : Activity() {

	override fun onCreate(savedInstanceState: Bundle?) {
		super.onCreate(savedInstanceState)
		relativeLayout {
			id = R.id.title_bar_layout
			imageView {
				id = R.id.back
				leftPadding = dip(5)
				rightPadding = dip(5)
				scaleType = ImageView.ScaleType.CENTER
			}.lparams {
				centerVertically()
			}
			textView {
				id = R.id.title
				//android:ellipsize = end //not support attribute
				singleLine = true
				visibility = View.GONE
			}.lparams {
				centerInParent()
				leftMargin = 75.0dip //not support value
				rightMargin = 75.0dip //not support value
			}
			textViewShape {
				id = R.id.right_text
				bottomPadding = dip(5)
				leftPadding = dip(15)
				rightPadding = dip(15)
				topPadding = dip(5)
				textSize = dimen(R.dimen.font14).toFloat()
				//app:radius = 3dp //not support attribute
				//app:solidColor = @color/color_2294ff //not support attribute
				//app:strokeColor = @color/color_2294ff //not support attribute
				//app:strokeTouchColor = @color/color_2294ff //not support attribute
				//app:strokeWith = 1 //not support attribute
				visibility = View.GONE
			}.lparams {
				alignParentRight()
				centerVertically()
				rightMargin = dip(10)
			}
			linearLayout {
				id = R.id.ll_right
				orientation = LinearLayout.HORIZONTAL
				visibility = View.GONE
				imageView {
					id = R.id.iv_right2
				}.lparams {
					rightMargin = dip(20)
				}
				imageView {
					id = R.id.iv_right1
				}
			}.lparams {
				alignParentRight()
				rightMargin = dip(10)
				centerVertically()
			}
		}
	}
}
